# -*- coding: utf-8 -*-
"""
@Time : 2025/9/23  22:16
@Author : Shang
@File : config.py
@IDE : PyCharm
"""
import os
from typing import Optional
from dotenv import load_dotenv

# 加载 .env
load_dotenv()

def get_env(key: str, default: Optional[str] = None) -> Optional[str]:
    return os.getenv(key, default)


def has_llm_creds() -> bool:
    return bool(os.getenv("LLM_API_KEY")) and bool(os.getenv("LLM_BASE_URL")) and bool(os.getenv("LLM_MODEL"))